package br.ufrpe.bsi.pvs.xml.response;

import br.ufrpe.bsi.pvs.xml.XMLUtil;

/**
 * fabrica de processos de response. recebe um tipo e retorna o processo
 * correto
 *
 */
public class ResponseProcessFactory {
	
	/** gets a response type and returns the correct response process instance */
	public static ResponseProcess getResponseProcess(String responseType) {
		switch (responseType) {
		case XMLUtil.ADDED:
			return new AddedResponseProcess();
			
		case XMLUtil.LISTED:
			return new ListedResponseProcess();
			
		case XMLUtil.QUERIED:
			return new QueriedResponseProcess();
			
		case XMLUtil.LOGGED:
			return new LoggedResponseProcess();
			
		default:
			return null;
		}
	}

}
